﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GoogleMapsApiWebServices.Core;

namespace GoogleMapsApiWebServices.Directions
{
    public class DirectionsRequest : MapsApiRequest
    {
        protected override string BaseUri { get { return @"http://maps.googleapis.com/maps/api/directions"; } }

        [QueryStringParameter(IsRequired =  true, QueryStringParameter = "origin")]
        public Location Origin { get; set; }

        [QueryStringParameter(IsRequired = true, QueryStringParameter = "destination")]
        public Location Destination { get; set; }

        [QueryStringParameter(IsRequired = false, QueryStringParameter = "destination")]
        public TravelMode? TravelMode { get; set; }

        [QueryStringParameter(IsRequired = false, QueryStringParameter = "waypoints", CollectionSeparator = '|')]
        public IList<Location> Waypoints { get; set; }

        [QueryStringParameter(IsRequired = false, QueryStringParameter = "alternatives")]
        public bool? UseAlternatives { get; set; }

        [QueryStringParameter(IsRequired = false, QueryStringParameter = "avoid")]
        public Avoid? Avoid { get; set; }

        [QueryStringParameter(IsRequired = false, QueryStringParameter = "units")]
        public UnitSystem? UnitSystem { get; set; }

        [QueryStringParameter(IsRequired = false, QueryStringParameter = "region")]
        public string Region { get; set; }

        [QueryStringParameter(IsRequired = false, QueryStringParameter = "language")]
        public string Language { get; set; }
    }
}
